<!DOCTYPE html>
<html>
<head>
<style>
div.check {
    position: relative;
    width: 600px;
}
div > div {
    margin: 10px 20px 20px 10px;
    width: 50px;
    height: 50px;
    background-color: green;
}
</style>
<script src="../../resources/check-layout.js"></script>
</head>

<body onload="checkLayout('.check')">
<div style="-webkit-writing-mode: horizontal-tb" class="check">
    <div data-offset-x=10 style="-webkit-writing-mode: vertical-rl"></div>
    <div data-offset-x=10 style="-webkit-writing-mode: vertical-lr"></div>
</div>

<div style="-webkit-writing-mode: horizontal-tb; direction: rtl" class="check">
    <div data-offset-x=530 style="-webkit-writing-mode: vertical-rl"></div>
    <div data-offset-x=530 style="-webkit-writing-mode: vertical-lr"></div>
</div>

<div style="-webkit-writing-mode: vertical-rl" class="check">
    <div data-offset-y=10 style="-webkit-writing-mode: horizontal-tb"></div>
</div>

<div style="-webkit-writing-mode: vertical-lr" class="check">
    <div data-offset-y=10 style="-webkit-writing-mode: horizontal-tb"></div>
</div>

<div style="-webkit-writing-mode: vertical-rl; direction: rtl" class="check">
    <div data-offset-y=10 style="-webkit-writing-mode: horizontal-tb"></div>
</div>

<div style="-webkit-writing-mode: vertical-lr; direction: rtl" class="check">
    <div data-offset-y=10 style="-webkit-writing-mode: horizontal-tb"></div>
</div>

<div style="-webkit-writing-mode: vertical-rl" class="check">
    <div data-offset-y=10 style="-webkit-writing-mode: horizontal-tb; direction: rtl"></div>
</div>

<div style="-webkit-writing-mode: vertical-lr" class="check">
    <div data-offset-y=10 style="-webkit-writing-mode: horizontal-tb; direction: rtl"></div>
</div>

</body>
</html>
